<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/3/2
  Time: 13:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="base.jsp" %>
<html>
<head>
    <title>登录</title>
    <script src="js/jquery-2.2.4.min.js"></script>
    <script src="js/utils/utils.js"></script>
    <script src="assets/bootstrap/js/bootstrap.js"></script>
    <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">

    <style>
        .boxview {
            margin-top: 15%;
            margin-left: 25%;
            width: 50%;
        }

    </style>
</head>

<body onkeydown="keyLogin();">
<div class="boxview">
    <h1>账户登录</h1>
    <form id="loginForm">
        <div class="form-group">
            <label for="account">登录名：</label>
            <input type="email" class="form-control" id="account" placeholder="登录名" name="maintainer.account">
        </div>
        <div class="form-group">
            <label for="password">登录密码：</label>
            <input type="password" class="form-control" id="password" placeholder="密码" name="maintainer.password">
        </div>
        <div class="from-group">
            <p id="msg" class="bg-danger hidden" style="color: red;">用户名或者密码不正确</p>
        </div>
        <button id="loginBtn" type="button" class="btn btn-primary btn-lg btn-block btn-danger"
                submitUrl="${basePath}maintainer/login">登录
        </button>

    </form>

</div>
</body>
</html>
<script src="js/login_js/login.js"></script>
<script>
    // 提交按钮
    $("#loginBtn").click(function () {
        login.submitLogin();
    });

    // 键盘事件
    function keyLogin() {
        if (event.keyCode == 13)  //回车键的键值为13
            login.submitLogin();
    }

</script>
